/**     
 * @{#} LogUtils.java Create on 2011-7-30 下午07:56:38     
 *     
 * Copyright (c) 2011 by xiaofeng.zhouxf     
 */
package com.sefer.memcached.utils;

import java.text.MessageFormat;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * @author <a href="mailto:xiaofeng.zhouxf83@gmail.com">xiaofeng.zhouxf</a>
 * @version 1.0
 */
public class LogUtils {

	public static void error(Logger log, String message) {
		log.log(Level.SEVERE, message);
	}
	
	public static void info(Logger log, String message) {
		log.log(Level.INFO, message);
	}

	public static void error(Logger log, String format, Object[] args) {
		log.log(Level.SEVERE, new MessageFormat(format).format(args));
	}

	public static void main(String[] args) {
		String[] object = { "123", "567" };
		LogUtils.error(Logger.getLogger(LogUtils.class.getName()),
				"test {0},{1}", object);
	}
}
